﻿@model XZen.Blogger.Chapter

@{
    ViewBag.Title = "Edit";
  
}

<br />
<div class="row">
    <div class="col-sm-6">

        <div class="panel panel-default">
            <div class="panel-heading">
                <h6 class="panel-title"><i class="icon-book"></i>Isssue on Books</h6>
                 <span class="label  pull-right">
                     @Html.ActionLink("Back To Issue","EditIssue", new {id=Model.IssueID}, null)
                </span>
            </div>
            <div class="panel-body">

                @using (Html.BeginForm("CreateChapter", "Magazine", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
                {
                    @Html.AntiForgeryToken()
                    @Html.ValidationSummary(true)
  

                    <div class="form" role="form">
                        @Html.HiddenFor(model => model.ID)
                           @Html.HiddenFor(model => model.IssueID)
                        @Html.HiddenFor(model => model.CoverPageUrl)
                       
                        <div class="form-group">
                            <label class="col-sm-2 control-label">Name: </label>
                            <div class="col-sm-10">
                                @Html.TextBoxFor(model => model.Name, new { @class = "form-control" })

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">Title: </label>
                            <div class="col-sm-10">
                                @Html.TextBoxFor(model => model.Title, new { @class = "form-control" })
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">Category: </label>
                            <div class="col-sm-10">
                                @Html.TextBoxFor(model => model.Category, new { @class = "form-control" })
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">IssueID: </label>
                            <div class="col-sm-10">
                                @Html.TextBoxFor(model => model.IssueID, new { @class = "form-control",  @readonly = "readonly" })
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">Description: </label>
                            <div class="col-sm-10">
                                @Html.TextAreaFor(model => model.Body, new { @class = "form-control", rows = "5", cols = "5", placeholder = "Default textarea" })
                            </div>
                        </div>
                        <div class="form-actions text-right">
                            <button type="submit" class="btn btn-primary">Submit</button>
                        </div>
                    </div>
        
      
                }

                <div>
                    @Html.ActionLink("Back to List", "Index")
                </div>

            </div>
     
        </div>
    </div>
    <div class="col-sm-6">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h6 class="panel-title"><i class="icon-book"></i>Popular Books</h6>
                <span class="label  pull-right">
                    @Html.ActionLink("Create New Chapter", "CreateChapter", "Magazine", new { id=Model.ID }, null)
                </span>
            </div>
            <div class="panel-body">
                <div class="datatable-chapter">
                    <table class="table">
                        <thead>
                            <tr>
                                <th>Title</th>
                                <th>Issue</th>
                            </tr>
                        </thead>
                        <tbody>
                            @*@foreach (var issue in Model.Chapters)
                            {
                                <tr>
                                    <td>@issue.Title</td>
                                    <td>@issue.Body</td>
                                </tr>
                            }*@
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
